﻿<phone:PhoneApplicationPage 
    x:Class="NodeGardenDirect3D.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="False">
    <phone:PhoneApplicationPage.Resources>
        <Style TargetType="TextBlock">
            <Setter Property="Foreground" Value="Black" />
        </Style>
        <Style TargetType="CheckBox">
            <Setter Property="Foreground" Value="Black" />
            <Setter Property="BorderBrush" Value="Black" />
        </Style>
        <Style TargetType="RadioButton">
            <Setter Property="Foreground" Value="Black" />
            <Setter Property="BorderBrush" Value="Black" />
        </Style>
    </phone:PhoneApplicationPage.Resources>

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <DrawingSurface x:Name="DrawingSurface" Loaded="DrawingSurface_Loaded" />

        <Grid x:Name="DebugConfigOptions" Background="LightGray">

            <StackPanel Margin="12,17,0,28">
                <TextBlock Text="NodeGarden - Debug &amp; Config options" FontWeight="SemiBold" Margin="12" />

                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <TextBlock Text="Additional Nodes to create:" Margin="12,0"  />
                    <Slider Minimum="0" Value="20" Maximum="50" x:Name="AdditionalNodesCount" Grid.Row="1" Margin="0,0,12,-36" SmallChange="1" LargeChange="10" />
                    <TextBlock Text="0" Margin="12,0" Grid.Row="2" />
                    <TextBlock Text="{Binding Path=Value, ElementName=AdditionalNodesCount, Converter={StaticResource SliderValueRounder}}" Margin="0" Grid.Row="2" HorizontalAlignment="Center" />
                    <TextBlock Text="50" Margin="12,0,24,0" Grid.Row="2" HorizontalAlignment="Right" />
                </Grid>

                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <RadioButton Content="UDP comms" x:Name="UdpComms" IsChecked="True" />
                    <RadioButton Content="Web comms" x:Name="WebComms" Grid.Column="1" />
                </Grid>

                <CheckBox x:Name="EnableShakeDetection" IsChecked="False" Content="Enable Shake Detection" />
                <CheckBox x:Name="EnableNoiseDetection" IsChecked="False" Content="Enable Noise Detection" />

                <TextBlock Text="v w.x.y.z" Margin="12,24" x:Name="DisplayedVersionNumber" />
            </StackPanel>
            <Button Content="Start" Foreground="Black" BorderBrush="Black" VerticalAlignment="Bottom" Margin="12" Click="StartClicked" />
        </Grid>
    </Grid>

</phone:PhoneApplicationPage>